//
//  STBWBrowserViewController.h
//  Pods-stoneobs_browser_Example
//
//  Created by imac on 2019/6/26.
//

#import <UIKit/UIKit.h>
#import "STBWBrowserKit.h"
NS_ASSUME_NONNULL_BEGIN
@class STBWBrowserViewController;
@protocol STBWBrowserViewControllerDelegate <NSObject>
@required;
//滑动到某个位置,返回当前cell中的imageview/button，imageView.contentMode = UIViewContentModeScaleAspectFill;在控制器dismiss的时候也会调用
- (UIView*)browserControllerDidScrollToIndexpath:(NSIndexPath*)indexPath
                                           model:(STBWPhotoModel*)model
                                      controller:(STBWBrowserViewController*)controller;
@optional;
//将要dismiss 此时访问了原图 可以更换model
- (void)willDismissFromSTPhotoSystemBrowserControllerCurrentIndexPath:(NSIndexPath*)currentIndexPath
                                                         currentModel:(STBWPhotoModel*)currentModel
                                                           controller:(STBWBrowserViewController*)controller;
//已经成功dismiss 此时访问了原图 可以更换model
- (void)didDismissFromSTPhotoSystemBrowserControllerCurrentIndexPath:(NSIndexPath*)currentIndexPath
                                                        currentModel:(STBWPhotoModel*)currentModel
                                                          controller:(STBWBrowserViewController*)controller;
//点击了右上角按钮，用户可以自定义出相应的操作
- (void)rightBarActionFromController:(STBWBrowserViewController*)controller
                    currentIndexPath:(NSIndexPath *)curentIndexpath;
@end
@interface STBWBrowserViewController : UIViewController
@property(nonatomic, strong) UIColor                                          *themeColor;//主题色
@property(nonatomic, strong) UICollectionView                                 *collectionView;
@property(nonatomic, assign) BOOL                                             shouldHideTopView;//是否隐藏顶部工具栏
@property(nonatomic, assign) BOOL                                             shouldHideBottomView;//是否隐藏底部工具栏
@property(nonatomic, assign) BOOL                                             shouldHideVisualEffectView;//是否隐藏高斯模糊
@property(nonatomic, assign) BOOL                                             shouldHideExcessiveAnimation;//是否消失动画，隐藏之后变为普通 pop 动画

@property(nonatomic,weak)    id <STBWBrowserViewControllerDelegate>           delegate;
@property(nonatomic, assign) CGFloat                     minZoomScale;/**< 最小缩放比列默认0.8 */
- (instancetype)initWithArray:(NSArray<STBWPhotoModel*>*)dataSouce curentIndex:(NSInteger)curentIndex;

- (void)reloadData;//重载数据
@end

NS_ASSUME_NONNULL_END
